﻿
    using System;
    using System.IO;
    using System.Runtime.CompilerServices;
    using System.Text;
    namespace WCYCReader.Utility
{
    public static class StreamHelper
    {
        public static Stream ToStream(this string str)
        {
            byte[] bytes = Encoding.UTF8.GetBytes(str);
            MemoryStream stream = new MemoryStream(bytes);
            stream.Write(bytes, 0, bytes.Length);
            return stream;
        }
    }
}

